Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(Button): auto generate visual test #1623

Merged
merged 10 commits into from
Aug 14, 2024
Merged

test(Button): auto generate visual test #1623

merged 10 commits into from
Aug 14, 2024

Conversation

itwillwork
Copy link
Contributor

No description provided.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@@ -0,0 +1,75 @@
import chunk from 'lodash/chunk';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a utility for generating regressive tests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't plan to use it, let's remove

import {ButtonStories, CustomIconSizeButton} from './helpersPlaywright';

test.describe('Button', () => {
test.describe('Button', {tag: '@Button'}, () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a tag for the component so that you can run tests for one or more components

package.json Outdated
@@ -85,7 +85,7 @@
"typecheck": "tsc --noEmit",
"prepublishOnly": "npm run build",
"playwright:install": "playwright install --with-deps",
"playwright": "playwright test --config=playwright/playwright.config.ts",
"playwright": "playwright test --config=playwright/playwright.config.ts --grep-invert=@regression",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all components without regression tests

playwright test --config=playwright/playwright.config.ts --grep-invert=@regression

one component

playwright test --config=playwright/playwright.config.ts --grep=@Button

one component with smoke tests

playwright test --config=playwright/playwright.config.ts --grep=@Button --grep=@smoke

all smoke tests

playwright test --config=playwright/playwright.config.ts --grep=@smoke

@itwillwork itwillwork force-pushed the auto-generate-visual-test branch from f44827d to 1f69dda Compare July 4, 2024 08:02
@gravity-ui-bot
Copy link
Contributor

Visual Tests Report is ready.

@itwillwork itwillwork changed the title Auto generate visual test test(Button): Auto generate visual test Jul 4, 2024
@itwillwork
Copy link
Contributor Author

removed regression tests

@itwillwork itwillwork changed the title test(Button): Auto generate visual test test(button): Auto generate visual test Jul 4, 2024
@itwillwork itwillwork changed the title test(button): Auto generate visual test test: Auto generate visual test Jul 4, 2024
@itwillwork itwillwork changed the title test: Auto generate visual test feat(Button): Auto generate visual test Jul 4, 2024
@itwillwork itwillwork changed the title feat(Button): Auto generate visual test test(Button): auto generate visual test Jul 4, 2024

export const loadingCases: Cases<ButtonProps['loading']> = [['loading', true]];

export const viewsCases: Cases<ButtonProps['view']> = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to keep flat array of values in cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,75 @@
import chunk from 'lodash/chunk';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't plan to use it, let's remove

@itwillwork itwillwork requested a review from goshander as a code owner August 1, 2024 09:28
@itwillwork itwillwork requested a review from amje August 1, 2024 09:53
@amje amje merged commit e04a753 into main Aug 14, 2024
6 checks passed
@amje amje deleted the auto-generate-visual-test branch August 14, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants